Log in Register Dashboard Temp Share Shortlinks Frames API

cody - HTMLify profile

cody's Profile Picture

cody

4270 Files

632704 Views

Latest files of /cody/swapnilsparsh/30DaysOfJavaScript/95 - Whack a Mole Game

dirt.svg cody/swapnilsparsh/30DaysOfJavaScript/95 - Whack a Mole Game/dirt.svg
127 Views
0 Comments
Media file
mole.svg cody/swapnilsparsh/30DaysOfJavaScript/95 - Whack a Mole Game/mole.svg
128 Views
0 Comments
Media file
style.css cody/swapnilsparsh/30DaysOfJavaScript/95 - Whack a Mole Game/style.css
130 Views
0 Comments
@import url('https://fonts.googleapis.com/css2?family=Shadows+Into+Light&display=swap');
html {
box-sizing: border-box;
font-size: 10px;

background-image: url("https://media.istockphoto.com/vectors/green-grass-lawn-with-clouds-and-sun-on-blue-sky-vector-id491628342?k=20&m=491628342&s=612x612&w=0&h=9Epm2f9lguyZl1kz_04700xEjFkxDd8haRouWBXIdBs=")
}
*, *:before, *:after {
index.html cody/swapnilsparsh/30DaysOfJavaScript/95 - Whack a Mole Game/index.html
322 Views
0 Comments
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Whack A Mole!</title>
<link href='https://fonts.googleapis.com/css?family=Amatic+SC:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="style.css">
</head>
script.js cody/swapnilsparsh/30DaysOfJavaScript/95 - Whack a Mole Game/script.js
182 Views
0 Comments
const holes = document.querySelectorAll('.hole');
const scoreBoard = document.querySelector('.score');
const moles = document.querySelectorAll('.mole');
let lastHole;
let timeUp = false;
let score = 0;
function randomTime(min, max) {
return Math.round(Math.random() * (max - min) + min);